import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/login/LoginView.vue'
import ProjectListView from '../views/project_list/ProjectListView.vue'
import ProjectDetailView from '../views/project_detail/ProjectDetailView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView
    },
    {
      path: '/project-list',
      name: 'project-list',
      component: ProjectListView
    },
    {
      path: '/project-detail/:id',
      name: 'project-detail',
      component: ProjectDetailView
    },
    // My Profile route will be implemented later
    {
      path: '/my-profile',
      name: 'my-profile',
      component: () => import('../views/project_list/ProjectListView.vue') // Temporary placeholder
    }
  ]
})

export default router
